<!DOCTYPE html>
<html>
<body>
  <h1>Write to self</h1>
  <script>document.write('Hello world');</script>
  <p>After write</p>
</body>
</html>